home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / xw2.000 / xw2 / xw / extensions / cursor.xwx < prev    next >
Encoding:
Text File  |  1994-07-28  |  1.4 KB  |  30 lines

  1. /* ===XbW-Benutzeroberflaeche==========================================
  2. \SystemUp{ 90 }; @xbw\start;              % 90 kB Datenbank Platz
  3. @wdw{ CSR1 3 4 30 25 };                   % Fenstername,x,y,b,h
  4. @button\stop{ CSR100 1 20 };              % Objektname,x,y STOPKNOPF
  5. \o{ CSR111 "@c" "@c" 1  7 27 10 DGray White White White 0};
  6. \@CursorInit; % Siehe UNTEN! Siehe COMMANDS.C!
  7. \End;
  8. %  ===C-Programm=mit=Erweiterungen===================================*/
  9. int  CXP,CYP,CObjH=-1   ;                /* KreuzXPos,KreuzYPos,Hook */
  10.   #define  OB  (*TO->XB- *TO->XA)              /* ObjektBreite       */
  11.   #define  OH  (*TO->YB- *TO->YA)              /* ObjektHoehe        */
  12.   #define  OTF (*TO->txc)                      /* ObjektTextFarbe    */
  13.   #define  OFL (*TO->bkc)                      /* ObjektFuellFarbe   */
  14.   #define  ODF (*TO->dfc)                      /* ObjektDunkelFarbe  */
  15. int EditC(Wdw *TW,Obj *TO,int *Dp,int X,int Y){
  16.   CXP=X;  CYP=Y; *Dp=1;
  17.   return(XbWDMf_CommandOk);
  18.   };
  19. int DispC(Wdw *TW,Obj *TO){
  20.   XbWSGr_TLBox(0,0 ,OB,OH," Cursor Box", OFL,OTF,ODF);     /* Kasten */
  21.   XbWSGr_Line( CXP-10,CYP   ,CXP+10 ,CYP   ,XbWVGr_White); /* Cursor */
  22.   XbWSGr_Line( CXP   ,CYP-10,CXP    ,CYP+10,XbWVGr_White); /*  ...   */
  23.   return(XbWDMf_CommandOk);
  24.   };
  25. int XbW_Extension_InitCursor(){   /* "\@CursorInit;" siehe OBEN!     */
  26.   XbWPSy_AddObjectHook(&CObjH,"@c",EditC,"@c",DispC);
  27.   return(XbWDMf_CommandOk);
  28.   };
  29.  
  30.